1. Field of the Invention
The present invention relates to a time-stamp corrector providing smooth playback of real-time data in a network that connects, for example, digital video cameras (DV cameras), televisions (TVs), and personal computers (PCs) to one another, and a method of correcting a time stamp.
2. Description of Related Art
A network that connects devices to one another frequently shares time information (hereinafter referred to as network time). For example, in FIG. 1, a first node, a second node (for example, a DV camera), a third node (for example, a TV), a fourth node (for example, a PC), and a fifth node form an EEE-1394 network N1. In the network, the first to fourth nodes share cycle time notified by cycle start packets from the fifth node serving as a cycle master. “Cycle time” is a term used by IEEE 1394 to refer to the network time.
In FIG. 2A, the IEEE-1394 network transmits cycle start packets 10a, 10b, and the like at intervals of 125 microseconds, and following the cycle start packets respectively, isochronous (ISO) packets 12a, 12b, and the like containing real-time data such as music and video data.
In FIG. 2B, a cycle start packet 10 includes a source ID to identify a device that transmits real-time data (hereinafter referred to as “transmitting device”), a destination ID to identify a device that receives the real-time data (hereinafter referred to as “receiving device”), and a cycle time (CYCLE-TIME).
In FIG. 2C, an ISO packet 12 includes a time stamp as well as real-time data such as music and video data. The time stamp indicates the time the receiving device plays the real-time data and is calculated by adding an offset value to a cycle-time value.
To transmit real-time data in synchronization with network time, the real-time data is temporarily stored in a storage device such as a synchronizing first-in, first-out (FIFO) memory. If the cycle time discontinuously changes, the real-time nature of the real-time data will not be maintained. For example, integrating a plurality of IEEE-1394 networks having different cycle times into one may cause such a cycle time discontinuity.
In FIG. 3, a first network N1 consists of first to fifth nodes, and a second network N2 consists of sixth to eighth nodes. The first and second networks N1 and N2 are integrated into a new network N3 by connecting the first and sixth nodes to each other. In the new network N3, the eighth node serves as a cycle master. Before integration, the first to fourth nodes have received cycle start packets from the fifth node, and after integration, the first to fourth nodes receive cycle start packets from the eighth node. Namely, for the first to fourth nodes, the cycle master has been changed from the fifth node to the eighth node due to the network integration.
As shown in FIG. 4, changing the cycle master in such a way may discontinuously change the value of cycle time CT contained in cycle packets from, for example, “61” to, for example, “20.”
In FIG. 4, a conventional transmitting device conforming to the IEEE-1394 standard adds an offset value OFT to the cycle-time value CT to provide a time-stamp value TS, which is included in an ISO packet. The ISO packet is stored in a synchronizing FIFO memory, and after predetermined clock periods (for example, six clock periods), is output from the synchronizing FIFO memory. The transmitting device may employ one or more cycle time counters. The ISO packet from the synchronizing FIFO memory is transmitted according to the IEEE-1394 standard, is received by a FIFO memory of a receiving device, and will be ready for play. The ISO packet may be kept in the FIFO memory of the receiving device for several clock periods. However, for the sake of simplicity of explanation, the example of FIG. 4 assumes that the ISO packet will be ready to play as soon as it is received by the FIFO memory of the receiving device. When the time-stamp value TS of the ISO packet agrees with a cycle-time value CT, the real-time data in the ISO packet is played.
For example, in FIG. 4, an ISO packet having a time-stamp value TS of “60” derived by adding an offset value OFT of “8” to a cycle-time value CT of “52” is input into the FIFO memory of the transmitting device. At a cycle-time value CT of “58,” the ISO packet is output from the FIFO memory of the transmitting device and becomes ready to be output from the FIFO memory of the receiving device. Two clock periods after that, at a cycle-time value CT of “60”, data in the ISO packet containing the time-stamp value TS of “60” is played.
Also in FIG. 4, an ISO packet having a time-stamp value TS of “64” derived by adding the offset value OFT of “8” to a cycle-time value CT of “56” is input into the FIFO memory of the transmitting device, and the value of the cycle time CT is discontinuously changed from “61” to “20” just before the ISO packet is output from the FIFO memory of the transmitting device. At the cycle-time value CT of “20,” the ISO packet becomes ready to be output from the FIFO memory of the receiving device. Two clock periods after that, the cycle time CT takes a value of “22” which disagrees with the time-stamp value TS of “64,” and therefore, data in the ISO packet will not be played.
Similarly, an ISO packet having a time-stamp value TS of “68” derived by adding the offset value of “8” to a cycle-time value CT of “60” is input into the FIFO memory of the transmitting device, and the value of the cycle time CT is discontinuously changed from “61” to “20” before the ISO packet is output from the FIFO memory of the transmitting device. When the cycle time CT takes a value of “24,” the ISO packet becomes ready to be output from the FIFO memory of the receiving device. Two clock periods after that, the cycle time CT takes a value of “26” which disagrees with the time-stamp value TS of “68,” and therefore, data in the ISO packet will not be played.
In this way, if the value of the cycle time CT is discontinuously changed after ISO packets are input into the synchronizing FIFO memory of the transmitting device and before the ISO packets are output therefrom, the ISO packets that have been input into the synchronizing FIFO memory before the change of the cycle time CT will not be played even when such packets are ready to be output from the synchronizing FIFO memory of the receiving device because time-stamp values in the ISO packets disagree with the values of the cycle time CT. This causes a partial loss of, for example, video images to be played on the receiving device.
The ISO packets that are not played are accumulated in the synchronizing FIFO memory of the receiving device. The accumulated unplayed packets will gradually increase, and the synchronizing FIFO memory of the receiving device will be filled with the unplayed packets and will be unable to receive new packets.